package com.shangqing.web.controller.system;

import com.shangqing.common.core.domain.AjaxResult;
import com.shangqing.system.duststorminfomation.entity.DustStorm;
import com.shangqing.system.duststorminfomation.service.IdustStormService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/dustStorminformation")
@Api(tags = "沙尘暴", description = "沙尘暴相关接口")
public class DustStormInformationController {

    @Autowired
    private IdustStormService idustStormService;

    @GetMapping("/selectHighTemInformation")
    @ApiOperation(value = "沙尘暴信息", notes = "", httpMethod = "GET")
    public AjaxResult selWindInformation() {
        List<DustStorm> dustStorms = null;
        try {
            dustStorms = idustStormService.getAll();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return AjaxResult.success("查询成功", dustStorms);
    }


}
